home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr23
/
commo642.zip
/
SAMPLES.MAC
< prev
next >
Wrap
Text File
|
1995-03-18
|
11KB
|
282 lines
┌───────────────────────────┐
│ Additional Macro Examples │
└───────────────────────────┘
This file contains a number of sample macros. They may need to be modified to
work for you. Feel free to copy any of them to COMMO.MAC or to an auxiliary
Macro File.
Macros used with external Zmodem drivers
───────────────────────────────────────────────────────────────────────────
For OMEN Technology programs, add the following macros at the top of COMMO.MAC
(if necessary, substitute "dsz.com" or "dsz.exe" for "gsz.exe"):
{:z_recv}
{exec-d %protodir\gsz.exe portx %_pad,%_irq ha both rz -mr %pr_down}
{alarm %pr_alarm} {retu}
{:z_send}
{exec-d %protodir\gsz.exe portx %_pad,%_irq ha both sz -mr %pr_file}
{alarm %pr_alarm} {retu}
For TEXAS Zmodem, add the following:
{:z_recv}
{exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -r %pr_down}
{alarm %pr_alarm} {retu}
{:z_send}
{exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -s %pr_file}
{alarm %pr_alarm} {retu}
For other Zmodem drivers, adapt the program's command line to create macros
similar to the above.
Generic login macro
───────────────────────────────────────────────────────────────────────────
My generic login macro will login to most popular BBS's. The generic login
subroutine can be called from mail run macros, etc. The GOLOok with
";passwor" ignores the string "password" in the opening instructions on an
Auntie board. Put {login} in your Dialing Directory macro field.
{:login} {capture y,c:\commo\commo.cap} RBBS, PCBoard, Auntie, etc.
{asci ,} {call gls} {}
Generic login subroutine
───────────────────────────────────────────────────────────────────────────
{:gls} {setlook 60,hng,10,|}
{setv ss_r,~|} {setv ss_yr,~y|}
{:li1} {sslo ss_r,(enter)} {sslo ss_yr,graphics (enter)}
{calo li1,li2,first name} {calo li1,li3,last name}
{sslo ss_yr,is this correct} {golo li1,;passwor}
{lookfor password} {send ~%_pas|} {return}
{:li2} {send ~Firstname|} {return}
{:li3} {send ~Lastname|} {return}
Start my mail reader after a mail run
───────────────────────────────────────────────────────────────────────────
{:cf3} {exec-ns slmr} {} SLMR Reader w/swap
Macros used at session termination
───────────────────────────────────────────────────────────────────────────
These two utilities are used in various macros. "hng" will hangup when
necessary, then "ncr" will wait for carrier detect to drop and continue
dialing numbers that are still marked.
{:hng} {pause 3} {hangup y}
{:ncr} {pause 1} {ifcarrier ncr} {pause 5} {dial ,} {beep} {}
PCBoard generic mailrun
───────────────────────────────────────────────────────────────────────────
Here is a macro using variables to do a mail run on a PCBoard with CAM-Mail,
Rosemail, QMail, etc. It will download only one packet each day and upload a
reply packet if one exists (deleting the packet if the upload is successful),
then log off.
This macro should be placed in a separate Macro File. E.g., PCBMAIL.MAC.
Five variables must be set prior to starting this macro. For convenience,
these can be set in the Dialing Directory entry. For example, to call Channel
1 and use the CAM-Mail door, the Dialing Directory entry (all on one line!)
would be:
Channel1 11/06/94 {1 617 354 5776} {password} ...
... {start,pcbmail.mac} {} {bbsid,channel1} {opendoor,mail} ...
... {maildoor,cam-mail} {nomsgs,no new messages} {ptim,3}
When a connection is made, {COMMO} will load PCBMAIL.MAC and GOTO the label
"start". If nodes are labeled "Channel11", "Channel12", etc., they will all
be UNMArked when the macro starts.
{:start}
{setv ss_r,~|} Variables for SSLOoks
{setv ss_y,~y} (These may be defined in COMMO.SET
{setv ss_yr,~y|} using "set" items. Then they can
{setv ss_n,~n} be used in other macros, too.)
{setv ss_nr,~n|}
{setv ss_c,~c}
{setv ss_ee,~~~~^[~^[}
{unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
{setv qwkfil,c:\slmr\store\%bbsid.qwk}
{capm filter}
{capt y,c:\cap\%bbsid.%_day} {asci ,}
{setl 30,hng}
{sslo ss_ee,press escape}
{sslo ss_ee,<esc> twice}
{golo ,pcboard (r)}
{look ^g}
{call gls}
{setl 60,hng,%ptim,n|}
{sslo ss_r,to continue}
{sslo ss_nr,(enter)=yes?}
{sslo ss_nr,(H)elp, More?}
{sslo ss_c,(C)ontinue}
{golo ,channel 1 command?}
{look main board command?}
{setl 120,hng} ** turn off prompt timer
{send open %opendoor|}
{look %maildoor command}
{file %qwkfil} {ifco ,mr_dl}
{comp _ffd,%_dat} {ifco mr_ul} ** only one .QWK per day
{:mr_dl}
{send d|}
{golo mr_ul,%nomsgs} {sslo ss_yr,when done?}
{sslo ss_yr,(y/n)} {sslo ss_yr,receive these}
{look %bbsid.qwk}
{call mail_dn} {look %maildoor command}
{ifex %qwkfil,,mr_dl} ** if error, try again
{:mr_ul}
{ifex %uldir\%bbsid.rep,,mr_gb} ** if reply, upload it
{send u|} {look %bbsid.rep} {call mail_up}
{look %maildoor command} {ifcon ,mr_ul} ** if error, try again
{:mr_gb}
{send g|} {goto hng}
WildCat! generic mailrun
───────────────────────────────────────────────────────────────────────────
The following macro does a mail run on most WildCat! BBS's with the TomCat!
mail door. The only variables that need to be set are "bbsid" and "ptim."
The "ss_" variables may be set in the Setup File (using the "set" keyword).
This macro should be placed in a separate Macro File. E.g., CATMAIL.MAC.
{:catmail}
{setv ss_ee,~^[^[}
{setv ss_r,~|}
{setv ss_y,~y} ** These assume "hotkeys" are set
{setv ss_n,~n}
{setv ss_bday,~mm-dd-yy|} <- your birthdate
{setv ss_pnum,~614-326-1309|} <- your phone number
{setv ss_name,~First Last|} <- your name
{unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
{setv qwkfil,c:\slmr\store\%bbsid.qwk}
{capm filter}
{capt y,c:\cmsg\%bbsid.%_day} {asci ,}
{setl 60,hng}
{sslo ss_ee,twice}
{sslo ss_r,[c]ontinue}
{sslo ss_name,first name}
{look password?} {send %_pas|}
{setl 120,hng,%ptim,|}
{sslo ss_r,[c]ontinue}
{sslo ss_r,[enter]}
{sslo ss_n,choice? [ ]}
{sslo ss_bday,birth date}
{sslo ss_pnum,phone number}
{sslo ss_n,bulletin menu?}
{golo ,push a key} ** Various main menu prompts
{golo ,your command}
{look main menu:} {send ~~m}
{golo ,push a key} ** Various message menu prompts
{golo ,your command}
{look message menu:} {send ~~d}
{:wc_md}
{setl 120,hng} ** turn off prompt timer
{sslo ss_r,[c]ontinue}
{golo ,tomcat menu}
{look wcmail command}
{file %qwkfil} {ifco ,wc_dl}
{comp _ffd,%_dat} {ifco wc_ul} ** only one .QWK per day
{:wc_dl}
{pause 1} {send d}
{golo wc_ul,nothing found}
{sslo ss_y,receive this packet}
{look %bbsid.qwk now}
{call mail_dn}
{golo ,tomcat menu}
{look wcmail command}
{ifex %qwkfil,,wc_dl} ** if error, try again
{exec-n c:\slmr\weldel.bat %bbsid} ** delete welcome, etc.
{:wc_ul}
{ifex %uldir\%bbsid.rep,,wc_bye} ** if reply, upload it
{pause 1} {send u}
{look %bbsid.rep} {call mail_up}
{golo ,tomcat menu}
{look wcmail command}
{ifcon ,wc_ul} ** if error, try again
{:wc_bye}
{pause 1} {send g}
{setl 2,hng}
{look logoff [y/n]} {send y}
{pause 1} {goto hng}
Mail download and upload subroutines
───────────────────────────────────────────────────────────────────────────
The mail download subroutine will rename your .QWK packets, keeping the last
six packets for each BBS. Mail upload will delete your .REP packet if the
upload is successful. These routines use Zmodem. You may want to change the
directories used.
{:mail_dn}
{ifex c:\slmr\store\%bbsid.qwk,,mail_dn1}
{exec-n del c:\slmr\store\%bbsid.1 > nul}
{exec-n ren c:\slmr\store\%bbsid.2 %bbsid.1 > nul}
{exec-n ren c:\slmr\store\%bbsid.3 %bbsid.2 > nul}
{exec-n ren c:\slmr\store\%bbsid.4 %bbsid.3 > nul}
{exec-n ren c:\slmr\store\%bbsid.5 %bbsid.4 > nul}
{exec-n ren c:\slmr\store\%bbsid.qwk %bbsid.5 > nul}
{:mail_dn1}
{setv pr_down,c:\slmr\store}
{setv pr_alarm,0}
{look ^XB00}
{call z_recv}
{ifer 1,,mail_dn2}
{exec-n del c:\slmr\store\%bbsid.qwk}
{:mail_dn2}
{return}
{:mail_up}
{setv pr_file,%uldir\%bbsid.rep}
{setv pr_alarm,0}
{call z_send}
{ifer 1,mail_up1}
{exec-N del %uldir\%bbsid.rep}
{:mail_up1}
{comp %_err,0} {return}
Message reading macros
───────────────────────────────────────────────────────────────────────────
These two macros are used for reading messages online. They use the grey plus
and minus keys in the lower right corner of the keyboard. The first one sends
a <cr>, then clears the screen. Makes messages a lot easier to read since
each one starts displaying at the top of the screen. The second macro just
sends a <cr>. Nice for keyboards without the extra Enter key.
{:gr+} {send |} {clear} {}
{:gr-} {send |} {}
History macro
───────────────────────────────────────────────────────────────────────────
Here is an online history macro. It allows you to resend anything that
appeared on the screen (commands, message quotes, etc.). You must have
Scrollback enabled.
It first saves the Screen Image File pathname in the variable "scrsav" (in
case you have stuff in that file you want to keep).
Then it sets the Screen Image File to a temporary file and goes into
Scrollback. In Scrollback you use the "W" command to write out the lines
containing the data you want to resend. Press Esc and edit the data.
Save the file and press Esc to exit the editor. The macro then does an ASCII
Upload of the file and deletes it. Then the Screen Image pathname is restored
to what it was before.
{:cf6} {setv scrsav,%_scr} {screen n,%dldir\temp} {scroll}
{edit %_scr} {asci %_scr} {exec-N del %_scr}
{screen n,%scrsav} {}
- end -